package com.mobile.persistent.entity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mobile.persistent.base.BaseEntity;

/**
 * @author qingqiu
 * 用户权限映射表
 */
@Entity
@Table(name="userPurview")
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
public class UserPurview extends BaseEntity {

	private static final long serialVersionUID = 1L;

	private Users user;
	private Purview purview;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="userId", columnDefinition="bigint")
	public Users getUser() {
		return user;
	}
	public void setUser(Users user) {
		this.user = user;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="purviewId", columnDefinition="bigint")
	public Purview getPurview() {
		return purview;
	}
	public void setPurview(Purview purview) {
		this.purview = purview;
	}
	
}
